﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Collection.Generic;

namespace Mailer.Model.Types
{
	public class User
	{
		public virtual Guid ID { get; set; }
		public virtual string Username { get; set; }
		public virtual string PasswordHash { get; set; }
		public virtual string Email { get; set; }		
		public virtual int State { get; set; }
		public virtual string Metadata { get; set; }
		// public virtual PersistentGenericSet<UserApplication> UserApplications { get; set; }
		public virtual PersistentGenericSet<Application> Applications { get; set; }
		public virtual IList<UserProperty> Properties { get; set; }
		public virtual IList<Role> Roles { get; set; }

		public User()
		{
			ID = Guid.Empty;
			Username = "";
			PasswordHash = "";
			Email = "";
			State = (int)UserState.New;
			Metadata = "";
		//	Applications = new PersistentGenericSet<Application>();
		//	Properties = new List<UserProperty>();
		//	Roles = new List<Role>();
		}
	}
}
